using FastEndpoints;
using FastEndpoints.Swagger;
using Microsoft.EntityFrameworkCore;
using TodoList.Data;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddFastEndpoints();
builder.Services.SwaggerDocument();
builder.Services.AddDbContext<ApplicationDbContext>(options =>
	options.UseInMemoryDatabase("TodoList"));
var app = builder.Build();
app.MakeSureDbCreated();
app.UseFastEndpoints();
app.UseSwaggerGen();
app.Run();
